package com.bwie.shopcar.service.impl;

import com.bwie.common.domain.Coupon;
import com.bwie.common.domain.ShopCar;
import com.bwie.common.domain.Systems;
import com.bwie.common.domain.request.ShopRequset;
import com.bwie.shopcar.service.ShopCarService;
import com.bwie.shopcar.mapper.ShopCarMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ShopCarServiceImpl implements ShopCarService {
    @Autowired
    private ShopCarMapper shopCarMapper;

    @Override
    public List<ShopRequset> showCars() {
        return shopCarMapper.showCars();
    }

    @Override
    public Integer updateAmount(Integer shopcarAmount, Integer shopcarId) {
        return shopCarMapper.updateAmount(shopcarAmount,shopcarId);
    }

    @Override
    public List<Coupon> downPacket(Integer userId) {
        return shopCarMapper.downPacket(userId);
    }

    @Override
    public Integer deleteShop(Integer shopcarId) {
        return shopCarMapper.deleteShop(shopcarId);
    }

    @Override
    public Integer buyProduct(Integer shopcarId) {
        return shopCarMapper.buyProduct(shopcarId);
    }

    @Override
    public List<ShopCar> findId(Integer shopcarId) {
        return shopCarMapper.findId(shopcarId);
    }

    @Override
    public void updateMoney(Integer userMoney, Integer userId) {
        shopCarMapper.updateMoney(userMoney,userId);
    }

    @Override
    public List<Systems> sendMessage() {
        return shopCarMapper.sendMessage();
    }

    @Override
    public Integer addSystems(Systems systems) {
        return shopCarMapper.addSystems(systems);
    }

    @Override
    public Integer giveUserCoupon(Coupon coupon) {
        shopCarMapper.giveUserCoupon(coupon);
        return null;
    }

    @Override
    public void deleteCoupon(Integer systemId) {
        shopCarMapper.deleteCoupon(systemId);
    }
}
